import React, { Component } from 'react'
import MyHeader from '../../components/会员购/MyHeader'
import MySwiper from '../../components/会员购/MySwiper'
import MyNotice from '../../components/会员购/MyNotice'
import MyList from '../../components/会员购/MyList'
import ShangPin from '../../components/会员购/ShangPin'
import { swiper } from '../../apis/home'
export default class MyHome extends Component {
  state = {
    arr: []
  }

  componentDidMount = () => {
    swiper().then((ok) => {
      // console.log(ok);
      this.setState({
        arr: ok.list
      }, () => {
        // console.log(this.state.arr);
      })
    })
  }
  render() {
    // console.log(this.props)
    return (
      <>
        <MyHeader></MyHeader>
        <MySwiper swiperlist={this.state.arr}></MySwiper>
        <MyNotice></MyNotice>
        <MyList></MyList>
        <ShangPin></ShangPin>
      </>
    )
  }
}
